package com.yanqu.road.server.channelserver.manager.activity.tonbing.task.impl;


import com.yanqu.road.entity.enums.activity.tonbing.eTonBingTaskType;
import com.yanqu.road.server.channelserver.manager.activity.tonbing.activity.ChannelTonBingMatch;
import com.yanqu.road.server.channelserver.manager.activity.tonbing.task.BaseChannelTonBingMatchTask;

public class ChannelTonBingMoveTask extends BaseChannelTonBingMatchTask {

    private long userId;
    private int teamId;

    public ChannelTonBingMoveTask(ChannelTonBingMatch match, long beginTime, long userId, int teamId) {
        super(match, beginTime);
        this.userId = userId;
        this.teamId = teamId;
    }

    @Override
    public void runTask() {
        match.channelTonBingMoveTask(userId, teamId);
    }

    @Override
    public String getId() {
        return generateId(userId, teamId);
    }

    @Override
    public eTonBingTaskType getType() {
        return eTonBingTaskType.Move;
    }

    public static String generateId(long userId, int teamId) {
        return userId + "-" + teamId;
    }
}
